function doUninstall()
{

  var cookieBundle;
  
  if (!cookieBundle)
    cookieBundle = document.getElementById("cookieBundle");

//alert('isMozilla: ' + PropFileExists("chrome://communicator/locale/wallet/CookieViewer.properties"));
//alert('isFireFox: ' + PropFileExists("chrome://browser/locale/cookieviewer/CookieViewer.properties"));

	var isFireFox = PropFileExists("chrome://browser/locale/cookieviewer/CookieViewer.properties");
	if (isFireFox)
	{
		alert(cookieBundle.getString("uninstallFirefoxMsg"));
		return;
	}

	var isMozilla = PropFileExists("chrome://communicator/locale/wallet/CookieViewer.properties");
	if (isMozilla)
	{
		window.openDialog("chrome://addneditcookies/content/uninstall/msgbox.xul", "_blank", "chrome,resizable=yes,modal=yes", "UnInstall Mozilla");
		return;
	}

	alert(cookieBundle.getString("uninstallUnsureMsg"));
	return;
	

}


/* ----------------------------------------------------------------------------- */
function PropFileExists(chrmUrl)
{

	var parent = document.getElementById("CookieEditorOptions");
	var sb = document.createElement("stringbundle");
	var sbName = 'sb_'+ (new Date()).valueOf(); //random name so the bundle of same name did not exist already
	sb.setAttribute('id', sbName);
	parent.appendChild(sb);

//	alert ('before setting src: ' + sb.src);
	sb.setAttribute("src", chrmUrl);
//	alert ('src before url: ' + sb.src);
	
	try{
		var sbExists = sb.stringBundle.getSimpleEnumeration().hasMoreElements();
//		alert('stringbundle exists');
		parent.removeChild(sb);
		return true;
	} 
	catch(e)
	{ 
//		alert('string bundle does not exist\n\n' + e);
		parent.removeChild(sb);
		return false;
	}

//fail safe
return false;

}
/* ----------------------------------------------------------------------------- */

function openURL_moz(aURL)
{
  openDialog("chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", aURL, null, null);
}
